﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Resources;


namespace FES.Intimex.Client.Shared.Splash
{
    /// <summary>
    /// Interaction logic for SplashScreen.xaml
    /// </summary>
    public partial class SplashScreen : Window
    {
        public SplashScreen ( )
        {
            InitializeComponent ( );
            this.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(SplashScreen_PreviewMouseLeftButtonDown);
        }

        void SplashScreen_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            Splash.Splasher.CloseSplash();
        }

        void root_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            Splasher.CloseSplash();
        }
        /// <summary>
        /// Hiển thị hình ảnh động
        /// </summary>
        /// <param name="Right"></param>
        private void ShowImage()
        {
            //string sPath = FileFolder.AppInfo.AppDirectory + "/Splash/progress_bar.gif";
            //if (System.IO.File.Exists(sPath))
            //{
            //    try
            //    {
            //        aimg.Height = 10;
            //        aimg.Stretch = Stretch.UniformToFill;
            //        System.Drawing.Image img = System.Drawing.Image.FromFile(sPath);
            //        aimg.AnimatedBitmap = (System.Drawing.Bitmap)img;
            //    }
            //    catch { }
            //}
        }
    }
}
